const express = require("express");

const router = express.Router();

/* 定义路由接口 */
// GET /
router.get("/get", function (req, res) {
  console.log(req, res);
  res.send("Hello From indexRouter");
});

// GET /headers
router.post("/headers", (req, res, next) => {
  res.send(
    JSON.stringify({
      headers: req.headers,
      body: req.body,
    })
  );
//   res.json({
//     msg: "msg from /post",
//     ...req.body,
//   });
});

module.exports = router;
